package com.onpositive.knowledge.model.value.audits;

import java.util.HashMap;

import com.onpositive.semantic.model.api.property.IProperty;

public class ValueCounterAuditResult extends AbstractAuditResult {
	
	HashMap <Object,Integer> statsMap = new HashMap<Object, Integer>() ;
	
	public ValueCounterAuditResult( IProperty prop) {
		super( prop ) ;
		looksApplyable = true ;
	}
	
	
	public int take( Object s )
	{
		Integer n = statsMap.get(s) ;
		n = n != null ? n+1 : 1 ;
		statsMap.put(s, n) ;
		return n ;
	}

	public HashMap<Object, Integer> getStatsMap() {
		return statsMap;
	}

}
